package com.huashi.dealer.modular.business.order.param;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * API订单请求参数
 *
 * @author 谭陈强
 * @since 2025-07-30
 */
@Data
@Schema(description = "API订单请求参数")
public class OrderRequestParam {

    @Schema(description = "skuId")
    private Long skuId;

    @Schema(description = "购买数量")
    private Integer buyNum;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "用户令牌")
    private String token;

    @Schema(description = "商品ID列表")
    private String goodsIds;

    @Schema(description = "购物车ID列表")
    private String cartIds;

    @Schema(description = "支付方式：10基本账户，30返利账户，40核销账户")
    private Integer payType;

    @Schema(description = "订单来源：10普通订单，30返利订单，40核销订单")
    private Integer source;

    @Schema(description = "收货地址ID")
    private Long addressId;

    @Schema(description = "优惠券ID")
    private Long couponId;

    @Schema(description = "积分数量")
    private Integer pointsNum;

    @Schema(description = "商品列表")
    private List<OrderGoodsParam> goodsList;

    @Schema(description = "赠品商品ID列表，格式：商品ID_无意义数字_数量，多个用逗号分隔")
    private String marketGoodsIds;

    @Schema(description = "订单ID")
    private Long orderId;

    @Schema(description = "订单号")
    private String orderNo;

    @Schema(description = "订单总金额")
    private BigDecimal totalPrice;

    @Schema(description = "订单实付金额")
    private BigDecimal orderPrice;

    @Schema(description = "优惠券抵扣金额")
    private BigDecimal couponMoney;

    @Schema(description = "积分抵扣金额")
    private BigDecimal pointsMoney;

    @Schema(description = "运费")
    private BigDecimal deliveryMoney;

    @Schema(description = "订单状态：10待付款，20待发货，30待收货，40已完成，50已取消")
    private Integer orderStatus;

    @Schema(description = "支付状态：10未支付，20已支付")
    private Integer payStatus;

    @Schema(description = "支付时间")
    private String payTime;

    @Schema(description = "发货时间")
    private String deliveryTime;

    @Schema(description = "收货时间")
    private String receivedTime;

    @Schema(description = "取消时间")
    private String cancelTime;

    @Schema(description = "数据类型：all全部，audit审核中，reject驳回，delivery待发货，partorder部分发货，received待收货，comment已完成")
    private String dataType;

    @Schema(description = "页码")
    private Integer page;

    @Schema(description = "每页数量")
    private Integer listRows;

    @Schema(description = "时间：10当月，20季度，30年度")
    private Integer time;

    @Schema(description = "是否是业务员：0经销商，1业务员")
    private Integer isStoreType;

    @Data
    @Schema(description = "订单商品参数")
    public static class OrderGoodsParam {
        @Schema(description = "商品ID")
        private Long goodsId;

        @Schema(description = "商品SKU ID")
        private Long goodsSkuId;

        @Schema(description = "商品数量")
        private Integer goodsNum;

        @Schema(description = "商品价格")
        private BigDecimal goodsPrice;

        @Schema(description = "商品名称")
        private String goodsName;

        @Schema(description = "商品图片")
        private String goodsImage;

        @Schema(description = "商品规格")
        private String goodsSpec;

        @Schema(description = "商品分类")
        private Integer categoryId;
    }
} 